/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package systole.persistence.brokersInterface;

import java.util.List;

import systole.domain.clinicalInformation.Surgery;
import systole.exceptions.ExceptionDAO;

/**
 *
 * @author jmj
 */
public interface SurgeryBroker {

    /**
     *
     * @param surgery
     * @throws ExceptionDAO
     */
    public void insert(Surgery surgery) throws ExceptionDAO;

    /**
     * @param surgery
     * @throws ExceptionDAO
     */
    public void update(Surgery surgery) throws ExceptionDAO;

    /**
     * @param id
     * @return The Surgery with id.
     * @throws ExceptionDAO
     */
    public Surgery getSurgeryById(Integer id) throws ExceptionDAO;

    /**
     * @return The complete list of surgery.
     * @throws ExceptionDAO
     */
    public List<Surgery> getAllSurgery() throws ExceptionDAO;

    /**
     *
     * @param name
     * @param id
     * @return if surgery exist
     * @throws ExceptionDAO
     */
    public boolean existSurgery(String name, Integer id) throws ExceptionDAO;

    /**
     * 
     * @param name
     * @return
     * @throws ExceptionDAO
     */
    public Surgery getSurgeryByName(String name)throws ExceptionDAO ;
}
